]> dgit.raspbian.org Git - gnome-shell.git/commit
popupMenu: make submenus scrollable if needed
authorOwen W. Taylor <otaylor@fishsoup.net>
Sat, 2 Apr 2011 16:35:03 +0000 (12:35 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 4 Apr 2011 19:46:46 +0000 (15:46 -0400)
commit50951d15eadcb0cb79ece8b0a0553e08d12e5731
treedacab2c2e69a3434bd3834c29ef43087b4948963
parent30076884ae1d16b5702446490a346a644709a0bb
popupMenu: make submenus scrollable if needed

Right now, the network menu will overflow the screen if More...
is selected with many access points. As a short-term workaround
for this, add a scrollbar for submenus of panel dropdown menus
if they would cause the toplevel menu to overflow the screen.

- Put the actors in a PopupSubMenu in a StScrollView so we get
  a scrollbar if the allocated space is smaller than the height
  of the menu. Expand animation is turned off in the scrolled case
  to avoid weirdness.
- When we pop up a panel menu, set a max-height style property
  on the panel menu to limit it to the height of the screen.
- Hack event handling while the scrollbar is dragged to make
  the scrollbar work properly.

https://bugzilla.gnome.org/show_bug.cgi?id=646001
js/ui/panelMenu.js
js/ui/popupMenu.js